import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import AdminInfo from '../views/AdminInfo.vue'
import FriendChat from '../views/chat/FriendChat.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login,
      alias: '/',
      hidden: true
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [{
        path: '/chat',
        name: 'FriendChat',
        component: FriendChat
      }, {
        path: '/userInfo',
        name: '个人中心',
        component: AdminInfo
      }
      ]
    }
  ]

})
